<?php
if (! defined ( 'BASEPATH' ))
	exit ( 'No direct script access allowed' );
class Posts extends MX_Controller {
	
	var $_table = 'posts';
	
	function __construct() {
		parent::__construct ();
		
		
		$_SESSION ['KCFINDER'] = array ();
		$_SESSION ['KCFINDER'] ['disabled'] = false;
		
		$this->load->library ( 'ckeditor', array ('instanceName' => 'CKEDITOR1', 'basePath' => base_url () . "ckeditor/", 'outPut' => true ) );
		$this->load->model ( 'posts_model' );
	}
	
	function detail() {
		$id = ($this->uri->segment ( 3 ) == '') ? 0 : $this->uri->segment ( 3 );		
		$detail = $this->posts_model->getDetail ( $id );
		$data ['detail'] = $detail;
		$data ['content'] = 'detail';
		$this->load->view ( 'front_end/index', $data );
	}
}